package com.gorillalogic.scrummonkey.events {
	import flash.events.Event;

	public class ScrumEvent extends Event {
		public static const PAGE:String = 'page';
		public static const PROJECT:String = 'project';

		public static const COLUMN_FILTER:String = 'columnFilter';
		public static const COLUMN_LEFT:String = 'columnLeft';
		public static const COLUMN_CLOSE:String = 'columnClose';
		public static const COLUMN_RIGHT:String = 'columnRight';

		public static const NOTE_NEW:String = 'noteNew';
		public static const NOTE_VIEW:String = 'noteView';
		public static const NOTE_EDIT:String = 'noteEdit';
		public static const NOTE_DELETE:String = 'noteDelete';
		public static const NOTE_SELECTION_CHANGED:String = 'noteSelectionChanged';
		public static const NOTE_DRAG:String = 'noteDrag';
		public static const NOTE_DROP:String = 'noteDrop';
		public static const NOTE_SHOW_ALL:String = 'noteShowAll';

		public static const CANCEL:String = 'cancel';
		public static const SUBMIT:String = 'submit';

		private var _data:Object = null;

		public function ScrumEvent(type:String, data:Object = null, bubbles:Boolean = false, cancelable:Boolean = false) {
			super(type, bubbles, cancelable);
			_data = data;
		}

		override public function clone():Event {
			return new ScrumEvent(type, _data, bubbles, cancelable);
		}

		public function get data():Object {
			return _data;
		}

		override public function toString():String {
			return 'ScrumEvent: type=' + type;
		}
	}
}